<template>
    <div class="myindex">
        <div class="userinfo">
            <div class="avatarUrl">
                <img :src="user.avatarUrl" alt="" style="width: 100%;">
            </div>
            <div class="username">
                <p>{{ user.nickname }}</p>
                <p>{{ user.groupname }}</p>
            </div>
            <div class="btns">
                <el-button @click="GetUpdateAccount()">编辑信息</el-button>
            </div>
        </div>
        <div class="mybid">
            <div class="tt">
                <p>我的投标</p>
                <p>更多信息 > </p>
            </div>
            <div class="list">
                <div class="listitem"  v-for="item in 3">
                    <div class="tts">
                        <el-tag effect="dark">已报价</el-tag>
                        <el-tag effect="dark" type="warning">待议价</el-tag>
                        <el-tag effect="dark" type="success">恭喜中标</el-tag>
                        上饶师范学院音乐楼闲置的三十台钢琴转让拍卖公告
                    </div>
                    <div class="tags">
                        <div class="tag">
                            <el-tag style="margin-right: 10px;">招标分类</el-tag>
                            <el-tag type="danger">139万元</el-tag>
                        </div>
                        <p>2023-07-12</p>
                    </div>
                </div>
            </div>
        </div>
        <div class="mybid">
            <div class="tt">
                <p>我的收藏</p>
                <p>更多信息 > </p>
            </div>
            <div class="list">
                <div class="listitem" v-for="item in 3" >
                    <div class="tts">

                        上饶师范学院音乐楼闲置的三十台钢琴转让拍卖公告
                    </div>
                    <div class="tags">
                        <div class="tag">
                            <el-tag style="margin-right: 10px;">招标分类</el-tag>
                            <el-tag type="danger">139万元</el-tag>
                        </div>
                        <p>2023-07-12</p>
                    </div>
                </div>
            </div>
        </div>
        <div class="mybid">
            <div class="tt">
                <p>浏览足迹</p>
                <p>更多信息 > </p>
            </div>
            <div class="list">
                <div class="listitem" v-for="item in 3" >
                    <div class="tts">

                        上饶师范学院音乐楼闲置的三十台钢琴转让拍卖公告
                    </div>
                    <div class="tags">
                        <div class="tag">
                            <el-tag style="margin-right: 10px;">招标分类</el-tag>
                            <el-tag type="danger">139万元</el-tag>
                        </div>
                        <p>2023-07-12</p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>


<script setup>
/**
 * 组件引入
 */
import {onMounted, reactive, ref, computed} from 'vue'
import http from "../../api/api.js"
import msg from "../../utils/Message.js"
import Cookies from "js-cookie";
import {useRouter} from 'vue-router'
/**
 * 全局变量
 * @type {UnwrapNestedRefs<{count: string, list: *[]}>}
 */

const router = useRouter()

var user = ref({
    avatarUrl: "https://www.xiaouhegongyi.cn//uploads/20230807/5af965b0ff70838168b7e7c136fe795a.jpeg",
    nickname: "哦"
})


/**
 * 页面挂载后
 */
onMounted(() => {
    isLogin()
});

/**
 * 计算属性
 */

/**
 * 方法区
 */

// 编辑信息
function GetUpdateAccount(){
    router.push("/myaccount")
}


// 是否登录
const isLogin = () => {
    const token = Cookies.get("token")
    if (!token) {
        msg.message("您未登录，请登录", 'error')
    }
}

</script>

<style lang="scss" scoped>
@import '../../assets/scss/index.scss';
</style>

